/*
 * @Descripttion: 
 * @version: 
 * @Author: yuanpingfang
 * @Date: 2021-04-09 09:41:13
 * @LastEditors: yuanpingfang
 * @LastEditTime: 2021-04-09 17:44:45
 */
import request from '@/utils/request'

// 查询待办任务列表
export function listTodo(query) {
  return request({
    url: '/workflow/todo/list',
    method: 'get',
    params: query
  })
}

// 查询待办任务详细
export function getTodo(taskId) {
  return request({
    url: '/workflow/todo/' + taskId,
    method: 'get'
  })
}
// 审核待办任务
export function completeTask(data) {
  return request({
    url: '/workflow/todo/completeTask',
    method: 'post',
    data: data
  })
}

// 导出待办任务
export function exportTodo(query) {
  return request({
    url: '/workflow/todo/export',
    method: 'get',
    params: query
  })
}
// 查询审批历史
export function queryHistoryTask(processInstanceId) {
  return request({
    url: '/workflow/todo/queryHistoryTask/' + processInstanceId,
    method: 'get'
  })
}

// 终止流程任务
export function terminateProcess(data) {
  return request({
    url: '/workflow/todo/terminateProcess',
    method: 'post',
    data: data
  })
}

